# 如果你想让某个匿名函数在定义时就捕获到值，可以将那个参数值定义成默认参数即可，就像下面这样：
#
# >>> x = 10
# >>> a = lambda y, x=x: x + y
# >>> x = 20
# >>> b = lambda y, x=x: x + y
# >>> a(10)
# 20
# >>> b(10)
# 30
# >>>

# >>> funcs = [lambda x, n=n: x+n for n in range(5)]
# >>> for f in funcs:
# ... print(f(0))
# ...
# 0
# 1
# 2
# 3
# 4
# >>>